using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using Backend.JYD.Model.Cust;

namespace Backend.JYD.EFDAL.Mapping
{
    public class RatingSourceMap : EntityTypeConfiguration<RatingSource>
    {
        public RatingSourceMap()
        {
            // Primary Key
            this.HasKey(t => t.SourceId);

            // Properties
            this.Property(t => t.Name)
                .HasMaxLength(50);

            this.Property(t => t.Desc)
                .HasMaxLength(100);

            // Table & Column Mappings
            this.ToTable("RatingSource");
            this.Property(t => t.SourceId).HasColumnName("SourceId");
            this.Property(t => t.Name).HasColumnName("Name");
            this.Property(t => t.Type).HasColumnName("Type");
            this.Property(t => t.Desc).HasColumnName("Desc");
        }
    }
}
